#define _CRT_SECURE_NO_WARNINGS

#include "string.h"


void test_string()
{
	pp::string s1;
//	cout << s1.c_str() << endl;

	pp::string s2("hellow peipei");
//	cout << s2.c_str() << endl;

	pp::string::iterator it1 = s2.begin();
	while (it1 != s2.end())
	{
		(*it1)++;
		it1++;
	}
	cout << s2.c_str() << endl;

	for (auto& ch : s2)
	{
		(ch)--;
		cout << ch << " ";
	}
	cout << endl;

	//s2.push_back('x');
	//s2.push_back('x');

	//cout << s2.c_str() << endl;
	//s2.append("Niko");
	//cout << s2.c_str() << endl;

	s2 += 'x';
	s2 += 'x';
	s2 += " Niko";
	cout << s2.c_str() << endl;
}

void test_string2()
{
	pp::string s1("I will pary for");
	cout << s1.c_str() << endl;
	cout << s1.size() << endl;


	s1.insert(s1.size(), " you");
	//cout << s1.c_str() << endl;
	//cout << s1.size() << endl;
	pp::string::iterator it1 = s1.begin();

	//s1.erase(it1, s1.end());
	//s1.erase(15, 2);
	//cout << s1.c_str() << endl;
	//cout << s1.size() << endl;
}

void test_string3()
{
	pp::string s1("I will pary for");
	pp::string s2("...sorry");
	
	cout << s1 << s2 << endl;

	cin >> s1;
	cout << s1 << endl;

	//pp::string s3 =  s1.substr(2, 15);
	//cout << s3 << endl;
}

void test_string4()
{
	pp::string s1("abcd");
	pp::string s2("acd");


	//bool cmp = operator<(s1, s2);
	cout << (s1 < s2) << endl;

	cout << (s1 > s2) << endl;
	cout << (s1 == s2) << endl;
	cout << (s1 >= s2) << endl;
	cout << (s1 <= s2) << endl;
	cout << (s1 != s2) << endl;
	
}




int main()
{
	//test_string();
	test_string2();
	//test_string3();
	//test_string4();
	//pp::string s1();

	std::string s1("hellow");


	std::cout << s1.capacity() << std::endl;

	return 0;
}